This in an AppleScript which changes the creator and file type of specified MP3 files to that of a chosen MP3 player. (Current list includes Audion, GrayAMP, MacAMP/MacAMP Lite/MACAST/MACAST Lite, MPEG Audio Player, Quicktime, SoundApp, and SoundJam. More can, and have been, added.) The "YA" in the title means "yet another," and this script is made to be an improved, free, version of "MP3 File Converter," by Dave Krug. (My web page (<http://www.ctol.net/~ross/yamfc/main.html>) should have a link.)
As Mr. Krug's AppleScript does, YA MP3 File Converter takes dropped files and folders, and assigns them certain file and creator types, as long as they already have valid types, or end with ".mp3". However, my AppleScript has several major advantages:
-you can add your own or remove existing MP3 players (if you aren't going to use them)
-it's free; I don't want any money for it
-you can look at and modify the source, or use pieces for your own AppleScripts
-YA MP3 File Converter once again knows of more (7! (or 10, depending on how you count)) MP3 players than does MP3 File Converter
The first time you drag stuff onto the script, it will ask you what mp3 player to set files for. If you need to, there are two other ways to bring up this dialog box again, to set it for a different application. One is to run the script by double clicking it. The other is to hold down the command key after dragging something onto it. Jon’s Commands is required to enable the latter. Although it's not required, I would highly suggest it, anyway.
Jon’s Commands is an AppleScript scripting addition (OSAX, pl. OSAXen) which adds lots of useful and cool commands to AppleScript's existing feature set. The price is right (nothing), it's really fast, and a new version just came out (2.1). Jon's a cool dude, too. Get it at: <http://www.seanet.com/~jonpugh/#Software>. Trust me, you won't regret it!
This script is freeware/open source, but it IS NOT public domain. You must give credit to me if you distribute it (leaving the readme intact counts), or parts of it, and you may not attempt to sell it, or parts of it. Other than that, feel free to use it for yourself, and modify it for your needs. You may distribute modified versions as long as they go to a single, specific individual, and it is known by that individual that the script was originally from myself. If you want to do something not specified here with it, e-mail me at <mailto:ross@ctol.net>.
I am completely open to any suggestions for changes, and contributions of "code" (I will give credit, of course). Please e-mail me. About anything. I'd just like to hear from people! I'd like to know how many people get this, and problems encountered. My address is <mailto:ross@ctol.net>. Please, send me some mail!
The AppleScript contains a good deal of comments, if you open it in Script Editor. You may find it useful, if you want to modify it for your own needs, or especially to find some nifty handlers which I've included. (hint: look towards the bottom of the script)
The web page for YA MP3 File Converter is located at <http://www.ctol.net/~ross/yamfc/main.html>. That is the one "official" distribution center, at the moment. Do you use Claris Emailer? If so, you may be interested in another AppleScript I've published, called text to emailer signatures (ttes). You can find it at <http://www.ctol.net/~ross/fortune/main.html>.
Hope to hear from you!
Credits
Thanks to: Kevin Senical, <digital@mac-addict.com> (displayFilesDone bug, addition of Audion); Brian Tobin, <faustorb@hotmail.com> (new checkForScriptingAddition()); and others, for their suggestions and bug reports.
Version History
1.2.1 (11/14/99): fixed bug in the dialog which asks if you want to know the number of files modified; changed one of the players to be "MacAMP/MACAST" instead of the longer way (was making some of the dialogs have a text overflow)(people should be able to figure out the "Lite" thing, anyway, and they can modify the player names, if they wish)
1.2 (9/16/99): fixed a very stupid bug with a variable being misspelled ("displayFilesDone" was "displayFilesDones", in one place); fixed mistake with use of setLots(); updated CheckForScriptingAddition() because of possible change in AppleScript (have to find out for sure); added the Audion and GrayAMP MP3 players; implemented use of semicolons (;); fixed various dialog box spelling and grammar, eh, "issues"; added the "MACAST" name for the former MacAMP
1.1.1 (9/11/99): now checks for (misnamed) Jon’s Commands with a non-curly apostrophe
1.1 (7/22/99): ability to edit player list without changing source added (major change)
1.0.1 (7/17/99): less dependence on Jon’s Commands; won't try to make various file types (application, control panels, etc) into mp3s; version info in Get Info box; increased Preferred Memory size to 500k
1.0 (7/16/99): first release; supports MacAMP/MacAMP Lite, MPEG Audio Player, Quicktime, SoundJam, and SoundApp